# -*- Python -*-
import talk

Import('env')

# local sources
talk.Library(
  env,
  name = 'webrtc',
  srcs = [
    'peerconnectionimpl.cc',
    'peerconnectionproxy.cc',
    'peerconnectionfactory.cc',
    'webrtcjson.cc',
    'webrtcsession.cc',
  ],
)

talk.Unittest(
  env,
  name = 'webrtc',
  srcs = [
    'peerconnection_unittest.cc',
    'unittest_utilities.cc',
    'webrtcsession_unittest.cc',
  ],
  libs = [
    'base',
    'expat',
    'jpeg',
    'json',
    'webrtc',
    'p2p',
    'phone',
    'srtp',
    'xmpp',
    'xmllite',
    'yuvscaler'
  ],
  include_talk_media_libs = True,
  mac_libs = [
    'crypto',
    'ssl',
  ],
  mac_FRAMEWORKS = [
    'Foundation',
    'IOKit',
    'QTKit',
  ],
  win_link_flags = [('', '/nodefaultlib:libcmt')[env.Bit('debug')]],
  lin_libs = [
    'rt',
    'dl',
    'sound',
    'X11',
    'Xext',
    'Xfixes',
    'Xrandr'
  ],
)
